package com.liuyi.netty.im.commons.codes.data;

import com.liuyi.netty.im.commons.codes.CodeConst;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 消息数据体
 *
 * @author Mr.Fmy
 * @since 2021-12-08
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataEvent extends LimData implements Serializable {
    private static final long serialVersionUID = 6915955923930929551L;

    /**
     * 事件
     */
    private CodeConst.Event event;

    /**
     * toId 类型
     */
    private CodeConst.EventToType toType;

    /**
     * 接收方id
     */
    private String toId;

    /**
     * 消息体
     */
    private Object data;
}
